package com.ikingtech.framework.sdk.organization.api;

import com.ikingtech.framework.sdk.base.model.PageResult;
import com.ikingtech.framework.sdk.organization.model.OrganizationManagerDTO;
import com.ikingtech.framework.sdk.organization.model.OrganizationUserDTO;

import java.util.List;
import java.util.Map;

/**
 * @author tie yan
 */
public interface OrgUserApi {

    /**
     * 移动用户到父部门
     *
     * @param parentId 父部门编号
     * @param deptIds 当前部门编号集合
     */
    void moveUser(String parentId, List<String> deptIds);

    /**
     * Loads organization users by department IDs.
     *
     * @param page The page number.
     * @param rows The number of rows per page.
     * @param deptIds The list of department IDs.
     * @return The PageResult object containing a list of OrganizationUserDTO objects.
     */
    PageResult<OrganizationUserDTO> loadUserByDeptIds(Integer page, Integer rows, List<String> deptIds);

    /**
     * Loads department IDs by user ID and tenant code.
     *
     * @param userId The user ID.
     * @param tenantCode The tenant code.
     * @return The list of department IDs.
     */
    List<String> loadDeptIdByUserId(String userId, String tenantCode);

    /**
     * Loads managers by user IDs.
     *
     * @param userIds The list of user IDs.
     * @return The list of OrganizationManagerDTO objects.
     */
    List<OrganizationManagerDTO> loadManagers(List<String> userIds);

    /**
     * Loads a manager by user ID.
     *
     * @param userId The user ID.
     * @return The OrganizationManagerDTO object.
     */
    OrganizationManagerDTO loadManager(String userId);

    /**
     * 获取指定部门下的用户数量
     *
     * @param deptIds 部门编号集合
     * @return 管理员用户信息列表
     */
    Map<String, Integer> getUserCount(List<String> deptIds);
}
